package com.zhuoding.controller;

import com.zhuoding.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value = "/user")
public class HelloController {

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String hello(){
        System.out.println("Hello Spring MVC 我来了...");
        return "success";
    }

    @RequestMapping("/login")
    public String login(String username ,String password){
        System.out.println(username);
        System.out.println(password);
        return "success";
    }

    @RequestMapping("/regist")
    public String regist(User user){
        System.out.println(user);
        return "success";
    }
}
